package com.xinlong.dao;

import com.xinlong.entity.Route;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface IRoutedao {

    @Select("select * from route")
    List<Route> selectRoute();

    @Select("select * from route where id=#{id}")
    Route selectRoutebyid(Integer id);

    @Insert("INSERT route values(null,#{name},#{route},#{content},#{productid})")
    void sevaRoute(Route route);

    @Delete("DELETE from route where id=#{id}")
    void deRoute(Integer id);

    @Update("update route set name=#{name},route=#{route},content=#{content},productid=#{productid} where id=#{id}")
    void upRoute(Route route);

}
